<?php
require_once 'aop/AopClient.php';
//require_once 'aop/request/AlipayTradePrecreateRequest.php';
define('AOP_PATH', dirname(__FILE__));
$aop = new AopClient();
$aop->gatewayUrl = 'https://openapi.alipaydev.com/gateway.do';
$aop->appId = '2016072900116809';
$aop->rsaPrivateKeyFilePath = AOP_PATH . '/keys/rsa_private_key.pem';
$aop->alipayPublicKey = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIgHnOn7LLILlKETd6BFRJ0GqgS2Y3mn1wMQmyh9zEyWlz5p1zrahRahbXAfCfSqshSNfqOmAQzSHRVjCqjsAw1jyqrXaPdKBmr90DIpIxmIyKXv4GGAkPyJ/6FTFY99uhpiq0qadD/uSzQsefWo0aTvP/65zi3eof7TcZ32oWpwIDAQAB';
$aop->apiVersion = '1.0';
//$aop->encryptKey = 'XgxmSAaFF3g/ebSDJAxlvA==';
$aop->postCharset = 'utf-8';
$aop->format = 'json';
$biz_content = array(
	'out_trade_no' => '20150320010101005',
	'total_amount' => '99',
	'subject' => '订单标题',
);
$aop->BizContent = json_encode($biz_content);
json_encode($biz_content);
//$request->setNeedEncrypt(true);
//$request->setBizContent($biz_content);
$url = $aop->executeUrl();
echo $url;
